package QC.MessageBox.beans;

import QC.MessageBox.annotation.APPTable;

/**
 * Created by Andaren on 2017/4/10.
 * Used for: 用于存储Wx用户信息
 */
@APPTable(table = "t_wx_user")
public class WXUser {

    @APPTable(column = "id", isId = true)
    private Long id;            // 关系表主键
    @APPTable(column = "wx_openid")
    private String wxOpenId;    // 微信公众号id（同一用户在不同公众号中openId不同）
    @APPTable(column = "wx_nickname")
    private String wxNickName;  // 微信用户昵称
    @APPTable(column = "head_url")
    private String headUrl;     // 微信用户头像
    @APPTable(column = "sex")
    private String sex;         // 微信用户性别
    /**
     * Web用户没有unionid，用该字段代表web粉丝分配到的融云talkId
     */
    @APPTable(column = "unionid")
    private String unionid;     // 多平台同一账号ID

    @APPTable(column = "createTime")
    private String createTime;  //  创建时间
    private String area;        // 地区
    private String address;     // 地址

    public String getCreateTime() {

        return createTime;
    }

    public WXUser setCreateTime(String createTime) {
        this.createTime = createTime;
        return this;
    }

    public WXUser() {

    }

    public Long getId() {
        return id;
    }

    public WXUser setId(Long id) {
        this.id = id;
        return this;
    }

    public String getWxOpenId() {
        return wxOpenId;
    }

    public WXUser setWxOpenId(String wxOpenId) {
        this.wxOpenId = wxOpenId;
        return this;
    }

    public String getWxNickName() {
        return wxNickName;
    }

    public WXUser setWxNickName(String wxNickName) {
        this.wxNickName = wxNickName;
        return this;
    }

    public String getHeadUrl() {
        return headUrl;
    }

    public WXUser setHeadUrl(String headUrl) {
        this.headUrl = headUrl;
        return this;
    }

    public String getSex() {
        return sex;
    }

    public WXUser setSex(String sex) {
        this.sex = sex;
        return this;
    }

    public String getUnionid() {
        return unionid;
    }

    public WXUser setUnionid(String unionid) {
        this.unionid = unionid;
        return this;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("WXUser{");
        sb.append("id=").append(id);
        sb.append(", wxOpenId='").append(wxOpenId).append('\'');
        sb.append(", wxNickName='").append(wxNickName).append('\'');
        sb.append(", headUrl='").append(headUrl).append('\'');
        sb.append(", sex='").append(sex).append('\'');
        sb.append(", unionid='").append(unionid).append('\'');
        sb.append(", createTime='").append(createTime).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
